// Demo:   demo.cpp
// Author: Evan Pezent (evanpezent.com)
// Date:   3/26/2021

#include "App.h"
#include "imgui-knobs.h"

struct imknobs : App {
    using App::App;
    float value;
    int intvalue;
    void Start() override
    {
        value = 0;
    }
    void Update() override
    {
        if (ImGuiKnobs::Knob("Tick", &value, -6.0f, 6.0f, 0.1f, "%.1fdB", ImGuiKnobVariant_Tick)) {
            // value was changed
        }
		 if (ImGuiKnobs::Knob("Dot", &value, -6.0f, 6.0f, 0.1f, "%.1fdB", ImGuiKnobVariant_Dot)) {
            // value was changed
        }
		
		 if (ImGuiKnobs::Knob("Wiper", &value, -6.0f, 6.0f, 0.1f, "%.1fdB", ImGuiKnobVariant_Wiper)) {
            // value was changed
        }
		 if (ImGuiKnobs::Knob("WiperOnly", &value, -6.0f, 6.0f, 0.1f, "%.1fdB", ImGuiKnobVariant_WiperOnly)) {
            // value was changed
        }
		 if (ImGuiKnobs::Knob("WiperOut", &value, -6.0f, 6.0f, 0.1f, "%.1fdB", ImGuiKnobVariant_WiperDot)) {
            // value was changed
        }
		 if (ImGuiKnobs::KnobInt("Stepped", &intvalue, -10, 10, 1, "%dB", ImGuiKnobVariant_Stepped)) {
            // value was changed
        }
		 if (ImGuiKnobs::Knob("Space", &value, -6.0f, 6.0f, 0.1f, "%.1fdB", ImGuiKnobVariant_Space)) {
            // value was changed
        }
    }
};

int main(int argc, char const* argv[])
{
    imknobs app("knobs演示", 1920, 1080, argc, argv);
    app.Run();

    return 0;
}
